/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ramuanajaib;

/**
 *
 * @author Administrat
 */
public class Main implements GameConstant{

    public static void main(String[] args) {
        //Bikin objek location baru
        Location location = new Location();

        //Menentukan bahan - bahan yang tersedia di lokasi
        location.addIngredient(new Ingredients(CATEGORY1));
        location.addIngredient(new Ingredients(CATEGORY2));
        location.addIngredient(new Ingredients(CATEGORY3));
        location.addIngredient(new Ingredients(CATEGORY4));

        //Ngeset pasien
        location.getPatient().setName("Bejo");
        location.getPatient().setProblem(PROBLEM_TooShort);
        location.addRequirement(CATEGORY1, 2);
        location.addRequirement(CATEGORY4, 2);

        String[] problem = {"Kurang tinggi", "Kurang kurus"};
        System.out.println("Nama Pasien : " + location.getPatient().getName());
        System.out.println("Masalah Pasien : " + problem[location.getPatient().getProblem()]);

        //Milih bahan buat ramuan (Nantinya ini dipilih dari menu di game)
        location.addPotionIngredient(CATEGORY1, 2);
        location.addPotionIngredient(CATEGORY4, 2);

        String[] category = {"kategori 1", "kategori 2", "kategori 3", "kategori 4"};
        System.out.println("Bahan - bahan yang dipilih untuk bikin ramuan : ");
        for (int i = 0; i < location.getPotion().getIngredients().size(); i++) {
            System.out.println(category[location.getPotion().getIngredients().elementAt(i).getCategory()]);
        }

        //Membuat ramuan dari bahan - bahan yang dipilih
        location.mixPotion();
        System.out.println("Mixing Potion..");

        String[] potion_effect = {"Gagal", "Sukses Besar", "Lumayanlah", "Pas-pas an"};
        System.out.println("Efek ramuan yang dihasilkan : " + potion_effect[location.getPotionEffect()]);

        //buat ngecek kondisi akhir
        location.checkEndCondition();
        System.out.println("Score : " + location.getScore());
        System.out.println("Star : " + location.getStar());
        System.out.println("Chapter : " + location.getChapter());
    }

}

